<!DOCTYPE html>
<html>
<head>
    <title>备件清单</title>
    #parse("sys/header.html")

    <!-- Include the Quill library
    <script src="https://cdn.quilljs.com/1.3.4/quill.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue-quill-editor@3.0.4/dist/vue-quill-editor.js"></script>
    <link href="https://cdn.quilljs.com/1.3.4/quill.core.css" rel="stylesheet">
    <link href="https://cdn.quilljs.com/1.3.4/quill.snow.css" rel="stylesheet">
    <link href="https://cdn.quilljs.com/1.3.4/quill.bubble.css" rel="stylesheet">-->
    <style>
        .rowMargin {
            margin-bottom: 10px;
        }
        .formBase {
            margin-top: 5px;
            line-height: 34px;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            #if($shiro.hasPermission("sparepart:save"))
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            #end
            #if($shiro.hasPermission("sparepart:update"))
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            #end
            #if($shiro.hasPermission("sparepart:delete"))
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            #end
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="container-fluid">
            <div class="row rowMargin">
                <div class="col-md-6 formBase">
                    <div class="col-sm-2 control-label">备件名称</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="sparePart.spareName" placeholder="备件名称"/>
                    </div>
                </div>
                <div class="col-md-6 formBase">
                    <div class="col-sm-2 control-label">单价</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="sparePart.unitPrice" placeholder="单价"/>
                    </div>
                </div>
            </div>
            <div class="row rowMargin">
                    <div class="col-md-6 formBase">
                        <div class="col-sm-2 control-label">币种</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control hidden" v-model="sparePart.currency" placeholder="币种"/>
                            <select  class="form-control"  id="currencySelect"  placeholder="币种">
                                <option value="CNY">CNY</option>
                                <option value="USD">USD</option>
                                <option value="JPY">JPY</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-md-6 formBase">
                        <div class="col-sm-2 control-label">语言编码</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control hidden" v-model="sparePart.language" placeholder="语言编码"/>
                            <select  class="form-control" id="languageSelect"    placeholder="语言编码">
                                <option value="CN">CN</option>
                                <option value="US">US</option>
                                <option value="JP">JP</option>
                            </select>
                        </div>
                    </div>
            </div>
            <div class="form-group hidden">
                <div class="col-sm-2 control-label">数据状态（0启用、1停用）</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="sparePart.status" placeholder="数据状态（0启用、1停用）"/>
                </div>
            </div>
            <div class="row rowMargin hidden">
                <div class="col-md-12 formBase">
                    <!--<div class="col-sm-1">备件描述</div>-->
                    <!--<div class="col-sm-11" style="padding-left: 30px;padding-right: 45px;">-->
                        <!--<quill-editor v-model="sparePart.language"-->
                                      <!--ref="quillEditorA"-->
                                      <!--@blur="onEditorBlur($event)"-->
                                      <!--@focus="onEditorFocus($event)"-->
                                      <!--@ready="onEditorReady($event)">-->
                        <!--</quill-editor>-->
                        <!--<div class="content ql-editor" v-html="sparePart.language"></div>-->
                    <!--</div>-->
                </div>
            </div>
            <div class="row rowMargin ">
                <div class="col-md-6 formBase">
                        <div class="col-sm-2 control-label">备件类型</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control hidden" v-model="sparePart.spareTypeId" placeholder="备件类型"/>
                            <select  class="form-control"  id="spareSelect"  placeholder="备件类型"    >
                            </select>
                        </div>
                </div>
                <div class="col-md-6 formBase hidden">
                    <div class="col-sm-2 control-label">添加人</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="sparePart.addUser" placeholder="添加人"/>
                    </div>
                </div>
            </div>
            <div class="row rowMargin">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${rc.contextPath}/js/generator/sparepart.js?_${date.systemTime}"></script>
</body>
</html>